<html><head><title>Functions to fit nonlinear additive models in GAMLSS</title>
<meta http-equiv="Content-Type" content="text/html; charset=">
<link rel="stylesheet" type="text/css" href="Rchm.css">
</head>
<body>

<table width="100%"><tr><td>nl(gamlss.nl)</td><td align="right">R Documentation</td></tr></table><object type="application/x-oleobject" classid="clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e">
<param name="keyword" value="R:   nl">
<param name="keyword" value="R:   gamlss.nl">
<param name="keyword" value="R:   nl.obj">
<param name="keyword" value=" Functions to fit nonlinear additive models in GAMLSS">
</object>


<h2>Functions to fit nonlinear additive models in GAMLSS</h2>


<h3>Description</h3>

<p>
The function <code>nl.obs</code> generate a nonlinear object which can be used to fit a nonlinear additive model within the gamlss algorithm.
The function <code>nl</code> takes the nonlinear object created by <code>nl.obs</code> and returns it with several attributes which  are used  
in the function  <code><a href="nl.html">gamlss.nl</a>()</code> which is doing the actual fitting within the backfitting  function 
<code>additive.fit</code>. The actual fit is done by the <font face="Courier New,Courier" color="#666666"><b>R</b></font> function <code>nlm</code>.  The  function <code><a href="nl.html">gamlss.nl</a>()</code> is never used on its own).
</p>


<h3>Usage</h3>

<pre>
nl.obj(formula, start, data)
nl(obj)
gamlss.nl(x, y, w,  xeval = NULL)
</pre>


<h3>Arguments</h3>

<table summary="R argblock">
<tr valign="top"><td><code>formula</code></td>
<td>
a non linear formula or function </td></tr>
<tr valign="top"><td><code>start</code></td>
<td>
starting values for the parameters in the <code>formula</code>  </td></tr>
<tr valign="top"><td><code>data</code></td>
<td>
data where the formula can be interpreted </td></tr>
<tr valign="top"><td><code>obj</code></td>
<td>
a non linear object created by <code>nl.obj</code></td></tr>
<tr valign="top"><td><code>x</code></td>
<td>
the nl object from <code>nl</code></td></tr>
<tr valign="top"><td><code>y</code></td>
<td>
iterative y variable </td></tr>
<tr valign="top"><td><code>w</code></td>
<td>
iterative weights</td></tr>
<tr valign="top"><td><code>xeval</code></td>
<td>
used in prediction if implemented</td></tr>
</table>

<h3>Details</h3>

<p>
The function <code>gamlss.nl()</code> is an internal function of GAMLSS allowing the use of  
the <code>nlm</code> function to be used within the backfitting cycle of <code>gamlss</code>, and should be not used on its own.
</p>


<h3>Value</h3>

<p>
The function <code>nl.obs</code> returns a non linear object by using the Jim Lindsey's function <code>finterp</code>
found in the R package <code>rmutil</code>.  
<br>
The function <code>nl</code> returns a vector with values zero to be included in the design matrix but with attributes useful in the fitting 
the non linear model.</p>

<h3>Note</h3>




<h3>Author(s)</h3>

<p>
Mikis Stasinopoulos <a href="mailto:d.stasinopoulos@londonmet.ac.uk">d.stasinopoulos@londonmet.ac.uk</a>, Bob Rigby <a href="mailto:b.rigby@londonmet.ac.uk ">b.rigby@londonmet.ac.uk </a>
</p>


<h3>References</h3>

<p>
<a href="http://popgen.unimaas.nl/~jlindsey/index.html">http://popgen.unimaas.nl/~jlindsey/index.html</a>: Jim Lindsey web page 
</p>
<p>
Rigby, R. A. and  Stasinopoulos D. M. (2005). Generalized additive models for location, scale and shape,(with discussion), 
<EM>Appl. Statist.</EM>, <B>54</B>, part 3, pp 507-554.
</p>
<p>
Stasinopoulos D. M., Rigby R.A. and Akantziliotou C. (2003) Instructions on how to use the GAMLSS package in R.
Accompanying documentation in the current GAMLSS  help files, (see also  <a href="http://www.gamlss.com/">http://www.gamlss.com/</a>).
</p>


<h3>See Also</h3>

<p>
<code><a href="nlgamlss.html">nlgamlss</a></code>
</p>


<h3>Examples</h3>

<pre>
data(la)
nlo&lt;-nl.obj(formula=~bflow*(1-(1-exp(p1))*exp(-p2/bflow)), start=c(-.9, 90), data=la)
mod1&lt;-gamlss(PET60~nl(nlo)-1, data=la ) 
</pre>



<hr><div align="center">[Package <em>gamlss.nl</em> version 1.6-0 <a href="00Index.html">Index]</a></div>

</body></html>
